<?php

namespace Acme\StoreBundle\Helper;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class BaseController extends Controller {
    private $_bundleName = 'StoreBundle';
    private $_entityName = '';
    
    private function _getRepository() {
        return $this->getDoctrine()->getRepository(''.$this->_bundleName.':'. $this->_entityName);
    }
    
    public function getPostRepository() {
        $this->_entityName = 'Post';
        return $this->_getRepository();
    }
    
    public function getCommentRepository() {
        $this->_entityName = 'Comment';
        return $this->_getRepository();
    }
    
    
}